package com.xqx.service.impl;

import com.xqx.dao.RoleDao;
import com.xqx.domain.Role;
import com.xqx.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author：xingquanxiang createTime：2019/10/5 14:38
 * description:
 */
@Service("roleService")
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleDao roleDao;
    /**
     * 查询所有角色
     *
     * @return
     */
    @Override
    public List<Role> findAll() {
        try {
            return roleDao.findAll();
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}
